/**
 * Created:	2011-07-20 09:05:29 
 * By:		eeorange
 * About: 	zoj1002 - Fire Net 代码太乱了， 思路不好
 */

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

#define INF			100000000
#define MAXN		1000

enum Status{ UNUSED, FIRED, USED, WALL};
struct Node{
	int pos;
	int value;
	Status status;
	int range;
	Node(int p, Status st){ pos = p, value = 0; status = st; range = 0; }
};

bool operator< (const Node& a, const Node& b){
	return a.range < b.range;
}

int width;	// 边长
vector<Node> city;	// 城市

void read_input(){
	cin >> width;
	city.clear();
	for(int i=0; i<width*width; i++){
		char ch;
		cin >> ch;
		switch(ch){
		case '.':	city.push_back(Node(i, UNUSED)); break;
		case 'X':	city.push_back(Node(i, WALL));	break;
		}
	}
}

static const int dx[] = {1, 0, -1, 0};
static const int dy[] = {0, 1, 0, -1};

void evaluate(){
	for(int i=0; i<width*width; i++){
		Node& node = city[i];
		node.range = 0;
		int x = node.pos % width;
		int y = node.pos / width;
		
		for(int j=0; j<4; j++){		// 遍历四个方向
			int nx = x, ny = y;
			for(;;){
				nx += dx[j], ny += dy[j];
				int pos = nx + ny*width;
				if(nx < 0 || nx > width ||  ny < 0 || ny > width || city[pos].status != UNUSED) break;
				node.range++;
			}
		}
	}
}


		
int main(){
	#ifdef LOCAL
		freopen("data.in", "r", stdin);
	#endif
	
	
	
	#ifdef LOCAL
		printf("\n****** END ******\n");
	#endif
	return 0;
}


